package com.jiumi.order.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jiumi.order.mapper.BaseOrderDetailMapper;
import com.jiumi.order.domain.BaseOrderDetail;
import com.jiumi.order.service.IBaseOrderDetailService;

/**
 * 订单详情Service业务层处理
 *
 * @author jiumi
 * @date 2023-05-24
 */
@Service
public class BaseOrderDetailServiceImpl extends ServiceImpl<BaseOrderDetailMapper,BaseOrderDetail>  implements IBaseOrderDetailService
{
    @Autowired
    private BaseOrderDetailMapper baseOrderDetailMapper;

    /**
     * 查询订单详情
     *
     * @param id 订单详情主键
     * @return 订单详情
     */
    @Override
    public BaseOrderDetail selectBaseOrderDetailById(Long id)
    {
        return baseOrderDetailMapper.selectBaseOrderDetailById(id);
    }

    /**
     * 查询订单详情列表
     *
     * @param baseOrderDetail 订单详情
     * @return 订单详情
     */
    @Override
    public List<BaseOrderDetail> selectBaseOrderDetailList(BaseOrderDetail baseOrderDetail)
    {
        return baseOrderDetailMapper.selectBaseOrderDetailList(baseOrderDetail);
    }

    /**
     * 新增订单详情
     *
     * @param baseOrderDetail 订单详情
     * @return 结果
     */
    @Override
    public int insertBaseOrderDetail(BaseOrderDetail baseOrderDetail)
    {
        return baseOrderDetailMapper.insertBaseOrderDetail(baseOrderDetail);
    }

    /**
     * 修改订单详情
     *
     * @param baseOrderDetail 订单详情
     * @return 结果
     */
    @Override
    public int updateBaseOrderDetail(BaseOrderDetail baseOrderDetail)
    {
        return baseOrderDetailMapper.updateBaseOrderDetail(baseOrderDetail);
    }

    /**
     * 批量删除订单详情
     *
     * @param ids 需要删除的订单详情主键
     * @return 结果
     */
    @Override
    public int deleteBaseOrderDetailByIds(Long[] ids)
    {
        return baseOrderDetailMapper.deleteBaseOrderDetailByIds(ids);
    }

    /**
     * 删除订单详情信息
     *
     * @param id 订单详情主键
     * @return 结果
     */
    @Override
    public int deleteBaseOrderDetailById(Long id)
    {
        return baseOrderDetailMapper.deleteBaseOrderDetailById(id);
    }

    @Override
    public List<BaseOrderDetail> selectOrderDetailListByOid(Long id) {
        return baseOrderDetailMapper.selectOrderDetailListByOid(id);
    }

    @Override
    public List<BaseOrderDetail> selectOrderDetailListById(String orderDetailId) {
        return  baseOrderDetailMapper.selectOrderDetailListById(orderDetailId);
    }

    @Override
    public int updateBaseOrderDetailPid(BaseOrderDetail detailParam) {
        return  baseOrderDetailMapper.updateBaseOrderDetailPid(detailParam);
    }
}
